Imports Aricie.Services
Imports Aricie.DNN.UI.Attributes
Imports System.ComponentModel
Imports Aricie.ComponentModel
Imports Aricie.DNN.ComponentModel
Imports DotNetNuke.UI.WebControls
Imports Aricie.DNN.UI.WebControls.EditControls

Namespace Aricie.DNN.Caching.Client

    <DefaultProperty("Name")> _
    <Serializable()> _
    Public Class CachingClientProviderInfo
        Implements IEnabled


        Private _Name As String = ""
        Private _Enabled As Boolean = True
        Private _Decription As String = ""
        Private _TypeName As String
        Private _SupportsNotifications As Boolean
        Private _SupportsTags As Boolean
        Private _SupportsSlidingExpiration As Boolean
        Private _SupportsTimeOutResets As Boolean
        Private _SupportsRegions As Boolean
        Private _SupportsOptimisticConcurrency As Boolean
        Private _SupportsPessimisticConcurrency As Boolean



        <Category("")> _
        <Required(True)> _
         <MainCategory()> _
        Public Property Name() As String
            Get
                Return _Name
            End Get
            Set(ByVal value As String)
                _Name = value
            End Set
        End Property

        <Category("")> _
        Public Property Enabled() As Boolean Implements IEnabled.Enabled
            Get
                Return _Enabled
            End Get
            Set(ByVal value As Boolean)
                _Enabled = value
            End Set
        End Property

        <Category("")> _
        <Required(True)> _
        <Width(500)> _
        <LineCount(2)> _
        <Editor(GetType(CustomTextEditControl), GetType(EditControl))> _
        Public Property Decription() As String
            Get
                Return _Decription
            End Get
            Set(ByVal value As String)
                _Decription = value
            End Set
        End Property

        <Category("")> _
        <Required(True)> _
        <Width(500)> _
        <LineCount(2)> _
        <Editor(GetType(CustomTextEditControl), GetType(EditControl))> _
        Public Property TypeName() As String
            Get
                Return _TypeName
            End Get
            Set(ByVal value As String)
                _TypeName = value
            End Set
        End Property

        <Category("Features")> _
        Public Property SupportsNotifications() As Boolean
            Get
                Return _SupportsNotifications
            End Get
            Set(ByVal value As Boolean)
                _SupportsNotifications = value
            End Set
        End Property

        <Category("Features")> _
        Public Property SupportsRegions() As Boolean
            Get
                Return _SupportsRegions
            End Get
            Set(ByVal value As Boolean)
                _SupportsRegions = value
            End Set
        End Property

        <Category("Features")> _
        Public Property SupportsSlidingExpiration() As Boolean
            Get
                Return _SupportsSlidingExpiration
            End Get
            Set(ByVal value As Boolean)
                _SupportsSlidingExpiration = value
            End Set
        End Property

        <Category("Features")> _
        Public Property SupportsTimeOutResets() As Boolean
            Get
                Return _SupportsTimeOutResets
            End Get
            Set(ByVal value As Boolean)
                _SupportsTimeOutResets = value
            End Set
        End Property

        <Category("Features")> _
        Public Property SupportsOptimisticConcurrency() As Boolean
            Get
                Return _SupportsOptimisticConcurrency
            End Get
            Set(ByVal value As Boolean)
                _SupportsOptimisticConcurrency = value
            End Set
        End Property

        <Category("Features")> _
        Public Property SupportsPessimisticConcurrency() As Boolean
            Get
                Return _SupportsPessimisticConcurrency
            End Get
            Set(ByVal value As Boolean)
                _SupportsPessimisticConcurrency = value
            End Set
        End Property

        <Category("Features")> _
        Public Property SupportsTags() As Boolean
            Get
                Return _SupportsTags
            End Get
            Set(ByVal value As Boolean)
                _SupportsTags = value
            End Set
        End Property




        Public Function GetClientProvider() As CachingClientProvider
            Dim toReturn As CachingClientProvider = ReflectionHelper.CreateObject(Of CachingClientProvider)(Me._TypeName)
            toReturn.ProviderSettings = Me
            Return toReturn
        End Function

    End Class
End Namespace